//
//  CNBottomBar.h
//  CsdnPlus
//
//  Created by 孟瑞瑞 on 2018/7/11.
//  Copyright © 2018年 CSDN. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "CNCommentToolbar.h"
#import <CNBaseTool/CNCategoryHeader.h>

typedef NS_ENUM(NSInteger, CNBottomBarType){
    CNBottomBarTypeBlogComment,//博客评论页面
    CNBottomBarTypeBlogCommentDetail,//博客评论详情页面
    CNBottomBarTypeBBSComment,//论坛评论页面
    CNBottomBarTypeBlinComment, //动态评论页面
} ;

@protocol CNBottomBarDelegate <NSObject>
@optional

- (void)didClickDiggBtn;

- (void)didClickShareBtn;

- (void)didClickCollectionBtn;

- (void)didClickCommentTextView;

- (void)showCommentView;

- (void)sendCommentWidthText:(NSString *)text PostId:(NSString *)postId IndexPath:(NSIndexPath *)indexPath;

- (void)sendCommentWidthText:(NSString *)text PostId:(NSString *)postId IndexPath:(NSIndexPath *)indexPath ParentIndexPath:(NSIndexPath *)parentIndexPath TableView:(UITableView *)subTableView;

- (void)sendCommentWithText:(NSString *)text itemId:(NSString *)itemId commentId:(NSString *)commentId replyUsername:(NSString *)replyUsername;

- (void)sendCommentWithText:(NSString *)text itemId:(NSString *)itemId commentId:(NSString *)commentId replyUsername:(NSString *)replyUsername IndexPath:(NSIndexPath *)indexPath ParentIndexPath:(NSIndexPath *)parentIndexPath TableView:(UITableView *)subTableView;
- (void)didClickAtButton;
@end

@interface CNBottomBar : UIView


@property(nonatomic, weak) id <CNBottomBarDelegate> delegate;

@property (nonatomic, strong) NSIndexPath *indexPath;

@property (nonatomic, strong) NSIndexPath *parentIndexPath;

@property (nonatomic, strong) UITableView *subTableView;

@property (nonatomic, copy) NSString *userName;

@property (nonatomic, copy) NSString *postId;

@property(nonatomic, copy) NSString *commentCount;

@property(nonatomic, copy) NSString *diggCount;

@property(nonatomic,assign) BOOL isDigg;//是否已经点赞

@property(nonatomic,assign) BOOL isCollection;//是否已经收藏

@property(nonatomic,assign) BOOL isMe;//是否是自己

@property (nonatomic, assign) BOOL isPrivacy;//是否是私密文章

@property (nonatomic, copy) NSString *commentId; //回复评论id
@property (nonatomic, copy) NSString *replyUserName ;// 被回复评论的用户名

@property (nonatomic,strong) UIView *lineView;

@property (nonatomic, strong) CNCommentToolbar *toolBar;

@property(nonatomic,readonly) PPStickerTextView *textView;
@property(nonatomic,assign)CNBottomBarType barType;

- (instancetype)initWithBarType:(CNBottomBarType)barType;

#pragma mark -- 显示键盘
- (void)showKeyboardViewWithText:(NSString *)text;

#pragma mark -- 显示键盘
- (void)showKeyboardView;
#pragma mark -- 点赞动画
- (void)addDigAnimation;
@end
